return [this.nColumns * childMin + spacing, this.nColumns * childNat + spacing];
}
- vfunc_get_preferred_height(container, _forWidth) {
+ vfunc_get_preferred_height(container, forWidth) {
const rows = this._getRows(container);
- let [minHeight, natHeight] = this._overlay.get_preferred_height(-1);
+ let [minHeight, natHeight] =
+ this._overlay.get_preferred_height(forWidth);
const spacing = (rows.length - 1) * this.row_spacing;
minHeight += spacing;
vfunc_allocate(container, box) {
const rows = this._getRows(container);
- const [, overlayHeight] = this._overlay.get_preferred_height(-1);
+ const [, overlayHeight] =
+ this._overlay.get_preferred_height(box.get_width());
const availWidth = box.get_width() - (this.nColumns - 1) * this.column_spacing;
const childWidth = Math.floor(availWidth / this.nColumns);
- this._overlay.allocate_available_size(0, 0, box.get_width(), box.get_height());
+ this._overlay.allocate_available_size(0, 0, box.get_width(), overlayHeight);
const isRtl = container.text_direction === Clutter.TextDirection.RTL;